package com.budwk.app.oss.services;

import com.budwk.app.oss.models.SysOss;
import com.budwk.starter.common.page.Pagination;
import com.budwk.starter.database.service.BaseService;
import org.nutz.dao.Condition;
import org.nutz.mvc.upload.TempFile;

import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.util.Collection;
import java.util.List;

public interface SysOssService extends BaseService<SysOss>{

    Pagination queryPageList(int pageNumber, int pageSize, Condition cnd);

    List<SysOss> listByIds(Collection<Long> ossIds);

    SysOss getById(Long ossId);

    SysOss upload(TempFile file);

    SysOss uploadFileName(TempFile file,String fileName);




    SysOss uploadNotUUID(TempFile file,String fileName);

    // wzy 2023-10-13 每部使用的上传
    SysOss upload(byte[] bytes,String fileName);

    List<SysOss> uploads(List<TempFile> files);

    SysOss upload(File file);

    // wzy 2023-10-13 内部使用的上传
    SysOss upload(File file,String fileName);

    void download(Long ossId, HttpServletResponse response) throws IOException;

    InputStream download(String fileName) throws IOException;

    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
}
